package com.common.converter;

import com.common.entity.evaluate.CheckEvaluateEntity;
import com.common.entity.target.TargetItemEntity;
import com.common.excel.excelinfo.CheckEvaluateExcelInfo;
import com.common.excel.excelinfo.EvaluateExportExcelInfo;
import com.common.requestvo.evaluate.CheckEvaluateReqVo;
import com.common.requestvo.target.TargetItemReqVo;
import com.common.vo.evaluate.CheckEvaluateVo;
import com.common.vo.target.TargetItemVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author johnny
 * @create 2020-07-13 下午5:04
 **/
@Mapper
public interface CheckEvaluateConverter {

    CheckEvaluateConverter INSTANCE = Mappers.getMapper(CheckEvaluateConverter.class);


    @Mappings({
            @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "updateTime", target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
    })
    CheckEvaluateVo domain2vo(CheckEvaluateEntity checkEvaluateEntity);

    @Mappings({
            @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "updateTime", target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
    })
    CheckEvaluateEntity vo2domain(CheckEvaluateReqVo checkEvaluateReqVo);


    CheckEvaluateEntity excelInfo2domain(CheckEvaluateExcelInfo checkEvaluateExcelInfo);

    EvaluateExportExcelInfo domain2excelvo(CheckEvaluateEntity checkEvaluateEntity);
}